Fixes correctness issues with xenstored and gcc-4.2.
Original patch by Charles Coffing <ccoffing@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
SHELL ?= /bin/sh
# Tools to run on system hosting the build
-HOSTCC = gcc
-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCC = gcc
+HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS += -fno-strict-aliasing
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /
CFLAGS += -g
endif
+CFLAGS += -fno-strict-aliasing
+
CFLAGS += -std=gnu99
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -Werror
CFLAGS += -Wno-unused
-CFLAGS += -fno-strict-aliasing
CFLAGS += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
CFLAGS += $(INCLUDES) -I. -I../../xenstore
CFLAGS += -D_GNU_SOURCE
CFLAGS += -Werror
CFLAGS += -Wno-unused
-CFLAGS += -fno-strict-aliasing -fPIC
+CFLAGS += -fPIC
# get asprintf():
CFLAGS += -D _GNU_SOURCE
-include $(XEN_TARGET_ARCH)/Makefile
CFLAGS += -Werror -Wmissing-prototypes
-CFLAGS += -fno-strict-aliasing
CFLAGS += $(INCLUDES) -I. -I../xenstore
# Needed for posix_fadvise64() in xc_linux.c
INCLUDES += -I $(XEN_LIBXC) -I $(XEN_XENSTORE)
-CFLAGS += -Werror -fno-strict-aliasing
+CFLAGS += -Werror
CFLAGS += $(INCLUDES)
# Make gcc generate dependencies.
# Used only by linux/Makefile.
AFLAGS_KERNEL += -mconstant-gp -nostdinc $(CPPFLAGS)
-CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS += -nostdinc -fno-builtin -fno-common
CFLAGS += -mconstant-gp
#CFLAGS += -O3 # -O3 over-inlines making debugging tough!
CFLAGS += -O2 # but no optimization causes compile errors!
# _no_ common code can have packed data structures or we are in touble.
C_WARNINGS += -Wpacked
-CFLAGS := -m64 -ffreestanding -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS := -m64 -ffreestanding -fno-builtin -fno-common
CFLAGS += -iwithprefix include -Wall -Werror -pipe
CFLAGS += -I$(BASEDIR)/include
CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-generic
CFLAGS += -nostdinc
endif
-CFLAGS += -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS += -fno-builtin -fno-common
CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
CFLAGS += -I$(BASEDIR)/include
CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic